<!--
 * @Author: zxc
 * @Date: 2020-10-27 17:02:47
 * @LastEditTime: 2020-10-30 16:31:14
 * @LastEditors: zxc
 * @Description: 
-->
<template>
  <Table :columns="columns" :data="datas" :key="'key'" class="table" id="edu">
    <template v-slot:action="date">
      <span @click="change(date)">we</span>
    </template>
  </Table>
</template>

<script lang="ts">
import Table from "./table.vue"
export default {
  components: { Table },
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
  setup() {
    const change = (date: any) => {
      console.log(date)
    }

    return {
      change,
      datas: [
        {
          key: "1",
          startTime: "2020-10-16",
          endTime: "2020-10-16",
          schoolName: "南京大学",
          specialty: "计算机",
          progress: "本科",
          degree: "学士学位",
          operation: "编辑"
        }
      ],
      columns: [
        {
          title: "开始年月",
          dataIndex: "startTime",
          scopedSlots: { customRender: "startTime" },
          key: "staryTime"
        },
        {
          title: "结束年月",
          className: "endTime",
          dataIndex: "endTime",
          key: "endTime"
        },
        { title: "学校名称", dataIndex: "schoolName", key: "schoolName" },
        { title: "专业", dataIndex: "specialty", key: "specialty" },
        { title: "学历", dataIndex: "progress", key: "progress" },
        { title: "学位", dataIndex: "degree", key: "degree" },
        {
          title: "操作",
          dataIndex: "operation",
          slots: { customRender: "action" },
          key: "operation"
        }
      ]
    }
  }
}
</script>

<style></style>
